<template>
	<div>
		<h1>五一快乐作业!</h1>
		<details>
			<summary>每天作业</summary>

			<p>每天25道面试题</p>
		</details>
		<div>
			<h1>我在这里练习git</h1>
			<!--  -->
			<!-- 手风琴的折叠面板 -->
			<el-collapse v-model="activeNames" @change="handleChange">
				<!-- 时间轴 -->
				<el-timeline :reverse="true">
					<el-timeline-item
						v-for="(item, index) in list"
						:key="index"
						:timestamp="item.date"
						placement="top"
					>
						<el-card>
							<!-- 内容 -->
							<el-collapse-item :title="item.title" :name="item.date">
								<div v-html="item.content"></div>
							</el-collapse-item>
						</el-card>
					</el-timeline-item>
				</el-timeline>
			</el-collapse>
		</div>
	</div>
</template>
<script>
import data from './data'
export default {
	mounted() {},
	computed: {
		_lits() {
			// 获取当天日期
			// 用当前日期对比每一条日期
			// 等于小于当天的日期 就返回
			const today = new Date().toLocaleDateString

			return this.list.filter((item) => item.date <= today)
		},
	},
	data() {
		return {
			today: date,
			list: data,
		}
	},
}
</script>